//
//  CollectionCell.swift
//  CompareBuying
//
//  Created by 唐先才 on 16/1/29.
//  Copyright © 2016年 唐先才. All rights reserved.
//

import UIKit

class CollectionCell: UICollectionViewCell {

    @IBOutlet weak var tagView: UIImageView!
    @IBOutlet weak var iconView: UIImageView!
    @IBOutlet weak var titleLab: UILabel!
    @IBOutlet weak var priceLab: UILabel!
    @IBOutlet weak var mallLab: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
    }
   
    func configCellWithModel(model: TxcModel) {
        guard let infoNation = model.InfoNation, mainImage = model.MainImage, infoTitle = model.InfoTitle, price = model.CommodityPrice, mallName = model.MallName else {
            return
        }
        if (infoNation) == "2" {
            iconView.image = UIImage(named: "tag_nation")
        }
        tagView.sd_setImageWithURL(NSURL(string: mainImage))
        titleLab.text = infoTitle
        priceLab.text = price
        mallLab.text = mallName + "供货"
    }

}





